first =[1,2,3,4,5]
#数组复制为地址引用，或者说是指针引用
second=first
print(second)
second.append(6)
print("first:",first)
print("second:", second)
#复制数组,深度复制？
third=second.copy()
second.append(6)
print("second:",second)
print("third:",third)
#列表正序访问和倒序访问
saying="1234567890abc"
letters=list(saying)
print("letters[0]:=",letters[0],"letters[-1]:=",letters[-1])
#========================================切片用法===========================================
#步长letters[start:stop:step]
print(letters[1:2:3])
#跳过前三个字母
print(letters[3:])
#取前10个字符
print(letters[:10])
#每两个字母选择1个
print(letters[::2])
book="the hitchhiker's guid to the galaxy"
booklist=list(book)
print(booklist)
print(''.join(booklist[0:3]))
print(''.join(booklist[-6:]))
#步长为负则倒向取值(从后向前取值)
backwards=booklist[::-1]
print(''.join(backwards))